define(['jquery', 'knockout', 'eventbus'], function ($, ko, eventbus) {
	return function () {

		// Click callback that cleans the localstorage and logs out.
		let logOut = function () {
			localStorage.clear();
			eventbus.publish("changeComponentEvent", "login");
		}

		// Return properties relevant for the UI.
		return {
			title: 'Your details',
			name: localStorage.getItem("userName"),
			email: localStorage.getItem("userEmail"),
			logOut
		}
	}
});